home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / tkerror.z / tkerror
Text File  |  1998-10-30  |  4KB  |  67 lines

  1.  
  2.  
  3.  
  4. ttttkkkkeeeerrrrrrrroooorrrr((((3333TTTTkkkk))))                                                      ttttkkkkeeeerrrrrrrroooorrrr((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      tkerror - Command invoked to process background errors
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ttttkkkkeeeerrrrrrrroooorrrr _m_e_s_s_a_g_e
  13.  
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      The ttttkkkkeeeerrrrrrrroooorrrr command doesn't exist as built-in part of Tk.  Instead,
  17.      individual applications or users can define a ttttkkkkeeeerrrrrrrroooorrrr command (e.g. as a
  18.      Tcl procedure) if they wish to handle background errors.
  19.  
  20.      A background error is one that occurs in a command that didn't originate
  21.      with the application.  For example, if an error occurs while executing a
  22.      command specified with a bbbbiiiinnnndddd of aaaafffftttteeeerrrr command, then it is a background
  23.      error.  For a non-background error, the error can simply be returned up
  24.      through nested Tcl command evaluations until it reaches the top-level
  25.      code in the application; then the application can report the error in
  26.      whatever way it wishes.  When a background error occurs, the unwinding
  27.      ends in the Tk library and there is no obvious way for Tk to report the
  28.      error.
  29.  
  30.      When Tk detects a background error, it saves information about the error |
  31.      and invokes the ttttkkkkeeeerrrrrrrroooorrrr command later when Tk is idle.  Before invoking  |
  32.      ttttkkkkeeeerrrrrrrroooorrrr, Tk restores the eeeerrrrrrrroooorrrrIIIInnnnffffoooo and eeeerrrrrrrroooorrrrCCCCooooddddeeee variables to their      |
  33.      values at the time the error occurred, then it invokes ttttkkkkeeeerrrrrrrroooorrrr with the
  34.      error message as its only argument.  Tk assumes that the application has
  35.      implemented the ttttkkkkeeeerrrrrrrroooorrrr command, and that the command will report the
  36.      error in a way that makes sense for the application.  Tk will ignore any
  37.      result returned by the ttttkkkkeeeerrrrrrrroooorrrr command.
  38.  
  39.      If another Tcl error occurs within the ttttkkkkeeeerrrrrrrroooorrrr command (for example,
  40.      because no ttttkkkkeeeerrrrrrrroooorrrr command has been defined) then Tk reports the error
  41.      itself by writing a message to stderr.
  42.  
  43.      If several background errors accumulate before ttttkkkkeeeerrrrrrrroooorrrr is invoked to     |
  44.      process them, ttttkkkkeeeerrrrrrrroooorrrr will be invoked once for each error, in the order  |
  45.      they occurred.  However, if ttttkkkkeeeerrrrrrrroooorrrr returns with a break exception, then |
  46.      any remaining errors are skipped without calling ttttkkkkeeeerrrrrrrroooorrrr.
  47.  
  48.      The Tk script library includes a default ttttkkkkeeeerrrrrrrroooorrrr procedure that posts a
  49.      dialog box containing the error message and offers the user a chance to
  50.      see a stack trace showing where the error occurred.
  51.  
  52.  
  53. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  54.      background error, reporting
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.